<template>
  <div class="app">
    <div class="tabber">
        <div class="tab" @click="hanleIndex(index)" :class="{active:currentIndex==index}" v-for="(item,index) in tab" :key="index">{{item}}</div>
    </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            currentIndex:0,
            tab:["首页","订单","我的"]
    }
    },
    methods:{
        hanleIndex(index){
           this.currentIndex=index
        }
    }
}
</script>

<style>
.tabber{
    width: 100%;
    height: 50px;
    border-top: 1px solid rgb(212, 207, 207);
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    background-color: white;
    
}
.active{
    color: rgb(31, 166, 220);
}
</style>